#include "SpriteSingle.h"
#include "Color.h"

namespace Implement
{
	typedef unsigned long DWORD;

	class TimeBar:public Graphics::SpriteSingle
	{
		Position m_Pos;
		DWORD	m_Now;
		DWORD	m_MaxValue;
		DWORD	m_MaxWidth;
		DWORD	m_MaxHeight;
		bool	m_IsHorizontal;
		Graphics::Color	m_ColorLT;
		Graphics::Color	m_ColorRB;
		int		m_Step;
	public:
		TimeBar(Graphics::Drawable* image,
				DWORD maxValue, DWORD maxWidth, DWORD maxHeight,
				bool isHorizontal = true);
		float GetRate(void);
		void SetPos(int x,int y);
		virtual const Position& GetPos(void);
		virtual bool RenderImpl();
	};

}
